// ==UserScript==
// @name         xhs0526Tes01
// @namespace    https://bbs.tampermonkey.net.cn/
// @version      0.1.0
// @description  try to take over the world!
// @author       You
// @match        https://www.xiaohongshu.com/*
// @require https://scriptcat.org/lib/637/1.4.3/ajaxHooker.js
// @run-at       document-start
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const observer = new MutationObserver(mutations => {
        mutations.forEach(mutation => {
            mutation.addedNodes.forEach(node => {
                if (node.tagName === 'SCRIPT' && node.src == 'https://fe-static.xhscdn.com/formula-static/xhs-pc-web/public/resource/js/vendor-dynamic.3293d643.js') {
                    console.log('检测到加载的脚本 URL:', node.src);
                    const replacedScript = document.createElement('script');
                    replacedScript.src = 'https://cdn.jsdelivr.net/gh/StutteringBoy/jsReverseFile@main/vendor-dynamic.3293d643.js'; // 替换为您想要的 URL
                    replacedScript.onload = function () {
                        console.log('新脚本已加载:', replacedScript.src);
                    };
                    node.parentNode.replaceChild(replacedScript, node);
                }
            });
        });
    });

    // 观察整个文档
    observer.observe(document, { childList: true, subtree: true });
})();